/*
 * Created on Jul 29, 2004
 * 
 * Distributed Debugger Prototype 1
 * 
 * File: Debugger.java
 */

package ddproto1;

import java.util.List;

import ddproto1.configurator.IObjectSpec;
import ddproto1.exception.ConfigException;
import ddproto1.interfaces.IUICallback;

/**
 * @author giuliano
 *
 */
public interface IDebugger {

    /** Starts the debugger main loop.
     * 
     * @throws IllegalStateException
     */
    public void mainLoop() throws IllegalStateException;
    
    /** Adds new node specifications for the debugger to manage. Usually
     * this method is called only once.
     * 
     * @param machines <b>NodeInfo</b> vector generated by a Configurator.
     * @throws IllegalStateException if mainloop is already running.
     * @throws ConfigException if the 'machines' vector contains errors.
     */
    public void addNodes(List<IObjectSpec> machines) throws IllegalStateException,
            ConfigException;
    
    /** The debugger is responsible, among other things, for providing 
     * or communicating with an user interaction interface (UI). This
     * method retrieves the object interface that allows other modules
     * to query the user interface for its state.  
     * 
     * @return callback query interface
     */
    public IUICallback getUICallback();
}